#+TITLE: Readme
#+AUTHOR: Zelphir Kaltstahl
#+EMAIL: zelphirkaltstahl@posteo.de
#+STARTUP: content indent align inlineimages hideblocks entitiesplain nologdone nologreschedule nologredeadline nologrefile
#+TODO: TODO INPROGRESS | DONE
#+DATE: [2021-09-23 Thu]
#+LANGUAGE: English
#+PRIORITIES: A E E



* Usage

** Run application

First activate the provided GNU Guix environment as follows:

#+begin_src shell
bash guix-env/env.bash
#+end_src

Then run the following command to start the application:

#+begin_src shell
make
#+end_src

** Run tests

First activate the provided GNU Guix environment as follows:

#+begin_src shell
bash guix-env/env.bash
#+end_src

Then run the following command to run tests:

#+begin_src shell
make test
#+end_src

* TODO To do [0/2]

** TODO Save state [0/3]

- [ ] make it possible to persist vocabulary changes
- [ ] save search result in extra file, perhaps optionally only indices and otherwise whole entries

** TODO Editing while learning [0/1]

- [ ] switch to a submenu instead of having many choices at once on the learn menu

* Notes

** Vocabulary structure

The first entry in the vocabulary is considered to be special, as all other entries are assumed to match its structure, meaning, that the program assumes, that they have the same attributes.

The assumed vocabulary structure is quite flexible, allowing for custom attributes to be added, as long as the following requirements are met.

*** Metadata

The program assumes, that there is an attribute ~"metadata"~ in each entry of the vocabulary. Some of the metadata gets built-in special treatment, like for example the ~learned~ metadatum. Such metadata is assumed to be in the vocabulary. If it was missing, the program would most likely crash.

**** id attribute

The program itself adds an ~"id"~ attribute to the metadata of each entry for managing it throughout the runtime of the program. For this reason the metadata of an entry must not contain an ~"id"~ attribute already.

**** learned attribute

The ~"learned"~ attribute in the metadata of a vocabulary entry is a boolean and is assumed to exist.

*** TODO Words
